package edu.gmu.messages;

import edu.gmu.middleware.Message;
import edu.gmu.streams.BlockInputStream;
import edu.gmu.streams.BlockOutputStream;
import java.io.IOException;

public class EchoRequest implements Message
{
    public int num;
    
    public EchoRequest()
    {

    }
    
    public EchoRequest(int num)
    {
        this.num = num;
    }
    
    public void setNum( int num )
    {
        this.num = num;
    }
    
    public int getNum()
    {
        return this.num;
    }

    public void marshal(BlockOutputStream stream) throws IOException
    {
        stream.writeInt(num);
    }
    
    public void unmarshal(BlockInputStream stream) throws IOException
    {
        this.num = stream.readInt();
    }
}
